The present invention relates to bitstream conversion in highly efficient encoding of analog video signals to digital signals with a small amount of codes for efficient video transfer, storage and display. Particularly, this invention relates to conversion of bitstreams of frames to be used as reference frames for interframe prediction and other frames not to be used as such reference frames.
Bitstreams of moving pictures encoded by highly efficient coding under the encoding standards such as MPEG standards are converted into other bit streams, for example, at a different data rate or from the variable transfer rate to the fixed transfer rate.
For such conversion, each encoded video data of a bitstream is completely decoded and encoded again (re-encoded) at a data rate different from the data rate for the previous encoding.
A portion of the encoded video data needs not be decoded and re-encoded if the basic encoding processing is the same for the previous encoding and the re-encoding. It can be combined as it is into the re-encoded bitstrearm. Motion vector information used for the previous encoding is also used as it is for the re-encoding without motion vector detection that requires a lot of computation. Motion compensated-interframe prediction is the same for the previous encoding and the re-encoding. Picture degradation caused by re-encoding will be very small due to difference only in quantization between the previous encoding and the re-encoding.
Such bitstream conversion is disclosed, for instance, in 1993 Video Encoding Symposium 1-6 xe2x80x9cStudy of Encoding Control in video re-encodingxe2x80x9d.
The bitstream that is subjected to bitstream conversion is a bitstream of moving pictures that has been encoded by motion-compensated interframe predictive coding.
The bitstream is decoded by motion-compensated interframe predictive decoding (called the first processing hereinafter) to reproduce video signals. The reproduced video signals are then re-encoded for bitstream conversion by motion-compensated interframe predictive encoding (called the second processing hereinafter).
The video signals are first subjected to motion-compensated interframe prediction to produce predictive error signals. The predictive error signals are transformed into DCT (Discrete Cosine Transform) coeffieints. The DCT coefficients are quantized at a predetermined stepsize so as to be fixed-length codes. The stepsize is different from the stepsize which has been used for inverse-quantization in the first processing. This stepsize difference depends on the transfer rate to be converted for the bitstream.
The fixed-length codes of DCT coefficients (predictive error signals) and also the motion vectors which have been detected by the first processing are encoded by valiable-length encoding to produce a converted bit stream (for which the transfer rate has been converted).
In these processing, the interframe motion-compensated prediction itself is the same processing for the first processing (decoding) and the second processing (re-encoding for bitstream conversion). Intra-frame processing only seems to be enough without addition and subtraction in the decoding and re-encoding, respectively.
Furthermore, the DCT processing in the second processing (re-encoding for bitstream conversion) is the inverse processing of the inverse-DCT processing in the first processing. Re-quantization in the second processing only seems to be enough without the inverse-DCT in the first processing and the DCT in the second processing.
However, the video signals reproduced by the first processing (decoding) and used as reference frames for prediction and those signals reproduced by the second processing (re-encoding) and also used as reference frames have different quatization errors due to difference in quantization processing in the first and second processing. A little bit different predictive signals thus result in these two processing.
No large errors would be produced for one prediction processing when interframe prediction is simplified as discussed above, such as, intra-frame processing only without addition and subtraction in the first and second processing, respectively. Recursive prediction processing will however accumulate errors to have a big difference between the video signals reproduced by the first and second processing. This causes picture quality to deteriorate.
Furthermore, all the frame types, that is, I frame (intra-coded frame), P frame (predictive-coded frame) and B frame (bidirectionally predictive-coded frame) are subjected to the first and second processing as discussed above. Such processing cause troubles in amount of codes to be processed and picture quality.
Re-quantization of predictive error signals without reproduced video signals is performed in a recursive prediction processing without respect to frame types. Such processing accumulates errors to reduce picture quality.
A purpose of the present invention is to provide an apparatus and a method of converting an input bitstream of moving pictures into another bitstream at a transfer rate different from that for the input bitstream with less amount of codes and less reduction in picture quality.
The present invention provides an apparatus for converting a bitstream of moving pictures which has been processed by motion-compensated interframe prediction. The apparatus includes a separator that separates an input bitstream into first codes of a predetermined number of intra-coded frames, second codes of frames to be used as reference frames for interframe prediction and third codes of frames other than the frames of the first and second codes. The apparatus also includes a decoder that decodes the first and the second codes to reproduce a first and a second video signal, respectively, an encoder that encodes the first video signal by interframe predictive coding using the second video signal as a reference video signal to obtain re-encoded codes, and a multiplexer that multiplexes the re-encoded, the second and the third codes to obtain a bitstream for which a video encoding method for the input bitstream is converted.
The present invention provides another apparatus for converting a bitstream of moving pictures which has been processed by motion-compensated interframe prediction. The apparatus includes a frame separator that separates an input bitstream into first codes of frames not to be used as reference frames for interframe prediction and second codes of frames to be used as the reference frames, and a code separator that separates the first codes into codes for interframe prediction and codes of interframe predictive error signals. The apparatus also includes a decoder that decodes the codes of interframe predictive error signals by using variable-length codes and invsersely quantizes the decoded codes to reproduce values of the interframe predictive error signals, a re-encoder that quantizes the reproduced values again and encodes the quantized values by using variable-length codes to obtain re-encoded predictive error signals, a code multiplexer that multipelexes the re-encoded predictive error signals and the codes for interframe prediction to obtain third codes, and a multiplexer that multiplexes the second codes and the third codes to obtain a bitstream to which an amount of codes of the input bitstream is converted.
Moreover, the present invention provides a method of converting a bitstream of moving pictures which has been processed by motion-compensated interframe prediction. An input bitstream is separated into first codes of a predetermined number of intra-coded frames, second codes of frames to be used as reference frames for interframe prediction and third codes of frames other than the frames of the first and second codes. The first and the second codes are decoded to reproduce a first and a second video signal, respectively. The first video signal is encoded by interframe predictive coding using the second video signal as a reference video signal to obtain re-encoded codes. The re-encoded, the second and the third codes are multiplexed to obtain a bitstream for which a video encoding method for the input bitstream is converted.
Moreover, the present invention provides another method of converting a bitstream of moving pictures which has been processed by motion-compensated interframe prediction. An input bitstream is separated into first codes of frames not to be used as reference frames for interframe prediction and second codes of frames to be used as the reference frames. The first codes are then separated into codes for interframe prediction and codes of interframe predictive error signals. The codes of interframe predictive error signals are decoded by using variable-length codes. The decoded codes are invsersely quantized to reproduce values of the interframe predictive error signals. The reproduced values are quantized again and encoded by using variable-length codes to obtain re-encoded predictive error signals. The re-encoded predictive error signals and the codes for interframe prediction are multiplexed to obtain third codes. The second codes and the third predictive errors are multiplexed to obtain a bitstream to which an amount of codes of the input bitstream is converted.